<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>宫小白-授权系统</title>
		<style>
			body{margin: 0; padding: 0;}
			.wrapper{ width: 96%; height: auto; margin: 0 auto; padding: 15px; border: #EBEBEB 1px solid; /*box-shadow:2px 2px 3px #aaaaaa;*/ }
			/*.top, .main{margin: 15px;}*/
			.top img{width: 100%; height: 300px;}
			.main{color: #b5b5b5; font-size: 26px;}
			.main label{display: none;}
			.main input{display: block; width: 60%; height: 1.8em; border: 0; border-bottom:#EFEFEF 1px solid; font-size: 26px;}
			.main .btn{background: #fff url(images/searchbtn.png) no-repeat; background-size: 100px 50px; width: 100px; height: 50px; margin: 10px auto; cursor: pointer;}
			.main .result{display: none; border-top: #EBEBEB 1px solid; margin-top: 60px; padding: 40px 0;}
			.main .result .info{width: 80%; height: 80px; line-height: 80px; margin: 0 auto; padding: 0 30px; color: #555555;}
			.main .result .info.first{background-color: #fafafa; text-align: left;}
			.main .result .info.second{background-color: #f3f3f3; }
			.main .result .info.second .success{display: inline-block; width: 50%;}
			.main .result .info.second .error{text-align: center;} 
		</style>
	</head>
	<body>
		<div class="wrapper">
			<div class="top">
				<img src="images/top.png" alt="授权系统" />
			</div>
			<div class="main" id="main">
				<label>微信号/手机号</label>
				<input type="text" id="phone" name="phone" placeholder="微信号/手机号" />
				<div class="btn"></div>
				
				<div class="result" id="result">
					<div class="info first"></div>
					<div class="info second"></div>
				</div>
			</div>
		</div>
		
		<script src="./js/jquery.min.js"></script>
		<script>
			$(function(){
				$('#phone').keyup(function(){
					var value = $('#phone').val();
					if(value){
						$('#main label').show();
					}else{
						$('#main label').hide();
					}
				});
				
				$('#main .btn').click(function(){
					checkPhone();
				});
			});
			
			function checkPhone(){
				var value = $('#phone').val();
				if(!value){
					alert('请输入微信号/手机号！');
					return false;
				}
				$('#result').show();
				if(value=='123'){
					$('#result .first').html('黄忠宇');
					$('#result .second').html('<span class="success">宫小白系列</span><span class="success">省级经销商</span>');
				}else{
					$('#result .second').html('<div class="error">您查询的代理信息不存在，谨防假冒伪劣！</div>');
				}
			}
			
		</script>
	</body>
</html>
